<div class="form-group row">
  <label for="input1" class="col-sm-2 form-control-label text-left" style="line-height: 35px">*账号</label>
  <div class="col-sm-6">
    <input type="text" class="form-control" id="input1" placeholder="账号" maxlength="20" [(ngModel)]="newUsersData.account">
  </div>
</div>
<div class="form-group row">
  <label for="inputPassword1" class="col-sm-2 form-control-label text-left" style="line-height: 35px">*姓名</label>
  <div class="col-sm-6">
    <input type="text" class="form-control" id="inputPassword1" maxlength="20" placeholder="姓名" [(ngModel)]="newUsersData.name">
  </div>
</div>
<div class="form-group row">
  <label for="inputPassword1" class="col-sm-2 form-control-label text-left" style="line-height: 35px">*密码</label>
  <div class="col-sm-6">
    <input type="password" class="form-control" id="inputPassword2" maxlength="20" minlength="6" placeholder="密码" [(ngModel)]="newUsersData.password">
  </div>
</div>
<div class="form-group row">
  <label for="inputPassword1" class="col-sm-2 form-control-label text-left" style="line-height: 35px">*确认密码</label>
  <div class="col-sm-6">
    <input type="password" class="form-control" id="inputPassword3" maxlength="20" minlength="6" placeholder="确认密码" [(ngModel)]="newUsersData.confirmPass">
  </div>
</div>
<div class="form-group row">
  <label class="col-sm-2 form-control-label text-left" style="line-height: 35px">*用户角色</label>
  <div class="col-sm-6">
    <select class="form-control" [(ngModel)]="newUsersData.type" >
      <!--此处的双向绑定，绑定的是item.id-->
      <option  *ngFor="let item of userRoles" [value] ="item.id" >{{item.name}}</option>
    </select>
  </div>
</div>
<div class="form-group row" *ngIf="newUsersData.type == 3">
  <label class="col-sm-2 form-control-label text-left" style="line-height: 35px">*所属企业</label>
  <div class="col-sm-6">
    <select class="form-control" [(ngModel)]="newUsersData.eid" >
      <option  *ngFor="let item of nameArr" [value] ="item.id" >{{item.name}}</option>
    </select>
  </div>
</div>
<div class="form-group row" style="">
  <div class="col-sm-offset-2 col-sm-10">
    <button type="submit" class="btn btn-primary" (click)="saveData()">确定</button>
    <button type="submit" class="btn btn-secondary" (click)="cancle()">取消</button>
  </div>
</div>




<div *ngIf="isModalShown" [config]="{ show: true }" (onHidden)="confirmshutdown()" bsModal #autoShownModal="bs-modal" class="modal fade" tabindex="-1" role="dialog" aria-hidden="true">
  <div class="modal-dialog modal-sm" [ngClass]="{'modal-success':issuccess,'modal-danger':!issuccess}">
    <div class="modal-content">
      <div class="modal-header">
        <h4 class="modal-title pull-left">提示</h4>
        <button type="button" class="close pull-right" aria-label="Close" (click)="confirmshutdown()">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body" style="text-align: center">
        <span>{{modelBody}}</span>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn " [ngClass]="{'btn-success':issuccess,'btn-danger':!issuccess}" (click)="confirmshutdown();">确定</button>
      </div>
    </div>
  </div>
</div>